/** @type {import('next').NextConfig} */
const nextConfig = {
    webpack(config) {
        config.module.rules.push({
            test: /\.svg$/,
            use: ["@svgr/webpack"]
        }); // 针对 SVG 的处理规则

        return config;
    },
    async headers(){
        return [
            {
              // Apply these headers to all routes in your application.
              source: "/:path*",
              headers: [
                { key: "Access-Control-Allow-Origin", value: "*" },
              ],
            },
          ];
    },
    images: {
        remotePatterns: [{
            protocol: 'https',
            hostname: 'api.ithinkai.cn',
            port: '',
            pathname:'/**'
        },{
            protocol: 'https',
            hostname: 'via.placeholder.com',
            port: '',
            pathname: '/**'
        }],
    }
}

module.exports = nextConfig
